import store from "../store";

export default {
    computed: {
        isLogin: () => !!store.getters["user/user"],
        user: () => store.getters["user/user"]
    },
    methods: {
        toLogin(backUrl) {
            return store.dispatch('user/toLogin', backUrl)
        },
        checkToPage(pageUrl) { /* Check login before redirect */
            return store.dispatch('user/authToPage', pageUrl)
        }
    }
}